package com.jhgk.jhcee.common.exception;

import com.jhgk.jhcee.common.enums.BasisResultEnum;

/**
 * @author: xiezhongping
 * @description:
 * @date: 2021/8/26 14:43.
 */
public class ResultfulException extends RuntimeException{
    private BasisResultEnum basisResultEnum;

    public ResultfulException(BasisResultEnum basisResultEnum) {
        super(basisResultEnum.getMessage());
        this.basisResultEnum = basisResultEnum;
    }

    public ResultfulException(String message) {
        super(message);
    }

    public ResultfulException(Throwable cause) {
        super(cause);
    }

    public ResultfulException(String message, Throwable cause) {
        super(message, cause);
    }

    public BasisResultEnum getErrorCode() {
        return basisResultEnum;
    }
}
